package com.ruoyi.houses.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.houses.domain.Community;
import com.ruoyi.houses.domain.HouseSource;
import com.ruoyi.houses.domain.Property;
import com.ruoyi.houses.mapper.HouseSourceMapper;
import com.ruoyi.houses.service.CommunityService;
import com.ruoyi.houses.service.PropertyService;
import com.ruoyi.houses.mapper.PropertyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 31439
* @description 针对表【property(房产信息表)】的数据库操作Service实现
* @createDate 2025-09-17 15:13:59
*/
@Service
public class PropertyServiceImpl extends ServiceImpl<PropertyMapper, Property>
    implements PropertyService{

    @Autowired
    PropertyMapper propertyMapper;
    @Autowired
    HouseSourceMapper houseSourceMapper;

    @Override
    public AjaxResult getcommunityType(Integer sourceId) {
        Property property = propertyMapper.getcommunityType(sourceId);

        return AjaxResult.success(property);
    }

    @Override
    public AjaxResult getTypeList(Integer typeId) {

        List<HouseSource> houseSources = houseSourceMapper.getTypelist(typeId);
        return AjaxResult.success(houseSources);
    }
}




